import pymysql
connect = pymysql.connect(host='127.0.0.1', port=3306, user='root', password='dddddd', db='madman')
cursor = connect.cursor()
sql = """insert into test(name, age, area) VALUES ('zhaoliang', 24, 'heibei')"""
cursor.execute(sql)
connect.commit()
result = cursor.fetchone()
print(result)